#pragma once

#include <folly/FBString.h>

#include <iomanip>
#include <sstream>

namespace porlarday
{
	using namespace folly;

	const int kYearSeconds = 31536000;
	const int kWeekSeconds = 604800;
	const int kDaySeconds = 86400;
	const int kHourSeconds = 3600;
	const int kMinuteSeconds = 60;

	class Time
	{

	enum class Eexception
	{
		eWrongFormat
	};

	public:
		Time() : unixTime_(std::time(nullptr)) {}

		Time(int year, int month, int day, int hour, int minute, int second);

		fbstring ToString(fbstring string = { "%Y-%m-%d %H:%M:%S" });

	private:
		std::time_t unixTime_;
	};

}